﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSpace.Core
{
    public interface ICoreSearcher
    {
        PagedResult<Privilege> FindPrivilege(string type, string name, string caption, int start, int limit);

        /// <summary>
        /// 获取角色没有分配的权限
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="include"></param>
        /// <returns></returns>
        ListResult<Privilege> FindPrivilegeNotInRole(Guid roleId);

        ListResult<RolePrivilegeDetail> FindPrivilege(Guid roleId);

        ListResult<Role> FindRoles(string filter);
    }

    public class RolePrivilegeDetail
    {
        public Guid RoleId { get; set; }
        public string RoleCode { get; set; }
        public string RoleCaption { get; set; }
        public Guid PrivilegeId { get; set; }
        public string PrivilegeCode { get; set; }
        public string PrivilegeCaption { get; set; }
        public string PrivilegeType { get; set; }
    }
}
